package com.lh.createData.service.Impl;

import com.lh.createData.dao.ReportProjectTotalMapper;
import com.lh.createData.model.InPutParam.ReportProjectTotalInParam;
import com.lh.createData.model.TotalProjectModel;
import com.lh.createData.service.ReportProjectTotalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ：梁昊，后端工程师：梁昊
 * @create 2021-07-23 10:49
 * @function
 * @editLog
 */
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
@Service
public class ReportProjectTotalServiceImpl implements ReportProjectTotalService {
    @Autowired
    ReportProjectTotalMapper reportProjectTotalMapper;

    /**
     * 定时任务：增加项目统计数
     *
     * @param reportProjectTotalInParam com.lh.createData.model.InPutParam.ReportProjectTotalInParam
     * @return 影响条数
     */
    @Override
    public int insertReportProjectTotal(ReportProjectTotalInParam reportProjectTotalInParam) {
        reportProjectTotalMapper.deleteReportProjectTotalByCreateDate(reportProjectTotalInParam);
        return reportProjectTotalMapper.insertReportProjectTotal(reportProjectTotalInParam);
    }

    @Override
    public TotalProjectModel selectReportProjectTotal() {
        return reportProjectTotalMapper.selectReportProjectTotal();
    }

}